package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "`user`")
public class User extends BaseEntity implements Serializable {
    /**
     * 用户编号
     */
    @TableId(value = "USER_ID", type = IdType.AUTO)
    private Integer userId;

    /**
     * 用户头像
     */
    @TableField(value = "USER_PHOTO")
    private String userPhoto;

    /**
     * 用户名称
     */
    @TableField(value = "USER_NAME")
    private String userName;

    /**
     * 用户手机号
     */
    @TableField(value = "USER_PHONE_NUMBER")
    private String userPhoneNumber;

    /**
     * 密码
     */
    @TableField(value = "PASSWORD")
    private String password;

    /**
     * 支付密码
     */
    @TableField(value = "PAYWORD")
    private String payword;

    /**
     * 身份证
     */
    @TableField(value = "CARD_ID")
    private String cardId;

    /**
     * 用户身份证国徽面图片地址
     */
    @TableField(value = "CARD_FRONT_IMG")
    private String cardFrontImg;

    /**
     * 用户身份证头像面图片地址
     */
    @TableField(value = "CARD_REVERSE")
    private String cardReverse;

    /**
     * 性别（男，女）
     */
    @TableField(value = "GENDER")
    private String gender;

    /**
     * 生日
     */
    @JsonFormat(shape=JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @TableField(value = "BIRTHDAY")
    private Date birthday;

    /**
     * 用户状态
     */
    @TableField(value = "USER_STATUS")
    private Byte userStatus;

    /**
     * 注册时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "REGISTER_TIME")
    private Date registerTime;

    /**
     * 商家账号
     */
    @TableField(value = "MERCHANT_ACCOUNT")
    private String merchantAccount;

    /**
     * 粉钻余额(默认为0)
     */
    @TableField(value = "PINK_DIAMOND")
    private Integer pinkDiamond;

    /**
     * 用户地址编号
     */
    @TableField(value = "USER_SITE_ID")
    private Integer userSiteId;

    /**
     * 创建人
     */
    @TableField(value = "CREATE_BY")
    private Integer createBy;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "CREATE_TIME")
    private Date createTime;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY")
    private Integer updateBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    @TableField(value = "UPDATE_TIME")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_USER_ID = "USER_ID";

    public static final String COL_USER_PHOTO = "USER_PHOTO";

    public static final String COL_USER_NAME = "USER_NAME";

    public static final String COL_USER_PHONE_NUMBER = "USER_PHONE_NUMBER";

    public static final String COL_PASSWORD = "PASSWORD";

    public static final String COL_PAYWORD = "PAYWORD";

    public static final String COL_CARD_ID = "CARD_ID";

    public static final String COL_CARD_FRONT_IMG = "CARD_FRONT_IMG";

    public static final String COL_CARD_REVERSE = "CARD_REVERSE";

    public static final String COL_GENDER = "GENDER";

    public static final String COL_BIRTHDAY = "BIRTHDAY";

    public static final String COL_USER_STATUS = "USER_STATUS";

    public static final String COL_REGISTER_TIME = "REGISTER_TIME";

    public static final String COL_MERCHANT_ACCOUNT = "MERCHANT_ACCOUNT";

    public static final String COL_PINK_DIAMOND = "PINK_DIAMOND";

    public static final String COL_USER_SITE_ID = "USER_SITE_ID";

    public static final String COL_CREATE_BY = "CREATE_BY";

    public static final String COL_CREATE_TIME = "CREATE_TIME";

    public static final String COL_UPDATE_BY = "UPDATE_BY";

    public static final String COL_UPDATE_TIME = "UPDATE_TIME";
}
